package cn.kelvin.oocl.dayone;

public class Decision {
	
	public static void main(String[] args) {
//		System.out.println(countNum(100));
//		System.out.println(countNum1(100));
//		System.out.println(countNum2(100));
		print(1,9);
	}
	
	public static void print(int start,int num){
		for(int i=start;i<=num;i++){
			for(int j=1;j<=i;j++){
				System.out.print(i+"*"+j+"="+i*j+" ");
			}
			System.out.println("\t");
		}
	}
	
	public static int countNum2(int n){
		int sum = 0;
		int i=0;
		do {
			sum += i;
			i++;
		} while (i<=n);
		return sum;
	}
	
	public static int countNum1(int n){
		int sum = 0;
		int i=1;
		while(i<=n){
			sum += i;
			i++;
		}
		return sum;
	}
	
	public static int countNum(int n){
		int sum = 0;
		for(int i=1;i<=n;i++){
			sum += i;
		}
		return sum;
	}
}
